<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show')
			this.getDeviceInfo()
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {
			// 获取设备信息
			getDeviceInfo() {
				uni.getSystemInfo({
					success: (res) => {
						// 获取成功后的设备信息
						if(res.model.indexOf('iPhone')>=0) {
							uni.setStorageSync('isiPhone', 1);
						} else {
							uni.removeStorageSync('isiPhone')
						}
					},
					fail: (err) => {
						console.error('获取设备信息失败：', err);
					}
				});
			}
		}
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-ui/index.scss";
	@import './static/scss/base.scss'
	/*每个页面公共css */
</style>
